﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

namespace SkypeBot
{
    class RssItem
    {
        public string Title { get; protected set; }

        public string Description { get; protected set; }

        public DateTime PubDate { get; protected set; }

        public RssItem(XmlNode node)
        {
            Title = node.SelectSingleNode("title").InnerText;
            Description = node.SelectSingleNode("description").InnerText;
            PubDate = DateTime.Parse(node.SelectSingleNode("pubDate").InnerText);
        }

        public override string ToString()
        {
            return Title + "\n" + PubDate.ToLocalTime() + "\n" + Description;
        }
    }
}
